package com.lanou3g.demo.service.impl;

import com.lanou3g.demo.entity.AdminInfo;
import com.lanou3g.demo.entity.ModuleInfo;
import com.lanou3g.demo.mapper.AdminInfoMapper;
import com.lanou3g.demo.service.ILoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class LoginService implements ILoginService {
    @Autowired
    private AdminInfoMapper infoMapper;

    @Override
    public Boolean findOne1(AdminInfo info) {
        AdminInfo pw = infoMapper.findOne1(info);
        System.out.println(pw);
        if (!pw.getPassword().equals(info.getPassword())) {
            return false;
        }
        return true;
    }

    @Override
    public List<ModuleInfo> findModule(String name) {
        return infoMapper.findModule(name);
    }


}